#ifndef DWARF__MANAGER_H
#define DWARF__MANAGER_H

#include "Debug.h"
#include "Subprogram.h"

#include <list>
#include <vector>

namespace dwarf {

class Manager {
public:
	static Manager &getInstance();
private:
	std::list<Debug> debugs_;
	std::vector<Subprogram> subprograms_;
private:
	Manager();
	Manager(const Manager &_manager);
	~Manager();
public:
	bool addDebug(const char *_file);
	const Subprogram *findSubprogram(const void *_pc) const;
private:
	bool addSubprograms(Debug &_debug, Dwarf_Die _die);
};

}

#endif // DWARF__MANAGER_H
